//
//  YJtableviewcell.m
//  YJTableViewCell
//
//  Created by yuanjiang on 2016/12/15.
//  Copyright © 2016年 YuanJiang. All rights reserved.
//

#import "YJtableviewcell.h"

@implementation YJtableviewcell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self =[ super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        UIView *backView=  [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 35)];
        backView.backgroundColor= [UIColor colorWithRed:219/255.0f green:219/255.0f blue:219/255.0f alpha:1.0];
        [self.contentView addSubview:backView];
       
        self.nameLabel = [[UILabel alloc] init];
        self.nameLabel.textAlignment = NSTextAlignmentLeft;
        self.nameLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:self.nameLabel];
        [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(backView.mas_left).offset(10);
            make.centerY.mas_equalTo(backView.mas_centerY);
            make.height.mas_equalTo(15);
        }];
        
        self.numLabel = [[UILabel alloc] init];
        [self.numLabel setFont:[UIFont systemFontOfSize:13]];
        self.numLabel.textAlignment = NSTextAlignmentLeft;
        [self.contentView addSubview:self.numLabel
         ];
        [self.numLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(backView.mas_centerY);
            make.right.mas_equalTo(backView.mas_right).offset(-8);
        }];
        
        self.moneyLabel=  [[UILabel alloc] init];
        [self.moneyLabel setFont:[UIFont systemFontOfSize:15]];
        self.moneyLabel.textAlignment = NSTextAlignmentLeft;
        [self.contentView addSubview:self.moneyLabel];
        [self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(backView.mas_centerY);
            make.right.mas_equalTo(self.numLabel.mas_left).offset(-3);
        }];
    }
    return self;
}








- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
